package org.ISCS.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;

/**
 * 
 * @TableName dockerhub
 */
@TableName(value ="dockerhub")
@Data
public class Dockerhub implements Serializable {
    /**
     * dockerhubid
     */
    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * 上传名称
     */
    private String dockerhubName;

    /**
     * 上传时间
     */
    private Date dockerhubTime;

    /**
     * 上传状态
     */
    private Integer dockerhubStatus;

    /**
     * 所属dockerid
     */
    private Long affiliateDockerId;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Dockerhub other = (Dockerhub) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getDockerhubName() == null ? other.getDockerhubName() == null : this.getDockerhubName().equals(other.getDockerhubName()))
            && (this.getDockerhubTime() == null ? other.getDockerhubTime() == null : this.getDockerhubTime().equals(other.getDockerhubTime()))
            && (this.getDockerhubStatus() == null ? other.getDockerhubStatus() == null : this.getDockerhubStatus().equals(other.getDockerhubStatus()))
            && (this.getAffiliateDockerId() == null ? other.getAffiliateDockerId() == null : this.getAffiliateDockerId().equals(other.getAffiliateDockerId()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getDockerhubName() == null) ? 0 : getDockerhubName().hashCode());
        result = prime * result + ((getDockerhubTime() == null) ? 0 : getDockerhubTime().hashCode());
        result = prime * result + ((getDockerhubStatus() == null) ? 0 : getDockerhubStatus().hashCode());
        result = prime * result + ((getAffiliateDockerId() == null) ? 0 : getAffiliateDockerId().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", dockerhubName=").append(dockerhubName);
        sb.append(", dockerhubTime=").append(dockerhubTime);
        sb.append(", dockerhubStatus=").append(dockerhubStatus);
        sb.append(", affiliateDockerId=").append(affiliateDockerId);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}